<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>自我介绍</title>
</head>
<body>
    <script>
        function Person(name,age,sex){
            this.name = name;
            this.age = age;
            this.sex = sex;
        }
        // 原型放功能
        Person.prototype.showMe = function(){
            console.log('我的名字叫'+this.name+'，性别'+this.age+'，年龄'+this.sex+'');
        }

        // 实例放数据
        let people1 = new Person('李四','男',18);
        people1.showMe();

        let people2 = new Person('张三','女',28);
        people2.showMe();
    </script>
</body>
</html>